﻿using GC_VKMD.MusicDownloaderClient.Abstractions.Factories;
using GC_VKMD.MusicDownloaderClient.Abstractions.Interfaces;
using GC_VKMD.MusicDownloaderClient.Enums;
using GC_VKMD.MusicDownloaderClient.ViewModels.Parameters;
using GC_VKMD.MusicDownloaderClient.WindowAdapters;

namespace GC_VKMD.MusicDownloaderClient.Factories
{
	public class WindowAdapterFactory : WindowAdapterBaseFactory
	{
		#region Constructors

		public WindowAdapterFactory(WindowBaseFactory windowFactory, WindowViewModelBaseFactories windowViewModelFactories)
			: base(windowFactory, windowViewModelFactories) { }

		#endregion

		#region Base Class Members

		public override IWindow CreateMusicDownloaderWindowAdapter(MusicDownloaderSettingsViewModelParameters parameters)
		{
			return new MusicDownloaderSettingsWindowAdapter(
				WindowFactory.CreateWindow(WindowType.MusicDownloader),
				WindowViewModelFactories.CreateMusicDownloaderViewModelFactory(),
				parameters);
		}

		public override IWindow CreateVKAutorizationWindowAdapter(MusicDownloaderViewModelParameters parameters)
		{
			return new MusicDownloaderWindowAdapter(
				WindowFactory.CreateWindow(WindowType.VKAutorization),
				WindowViewModelFactories.CreateVKAutorizationViewModelFactory(),
				parameters);
		}

		#endregion
	}
}
